package com.lynx.service;

import java.util.List;

import com.lynx.service.exception.JobCenterException;
import com.lynx.service.model.JobInfoBO;

/**
 * @author chris.liu
 * @version 5/6/14 4:06 PM
 */
public interface JobCenterService {

    int getJobInfoPageSize();

	/**
	 * 根据Id获取Job信息
	 * 
	 * @param id
	 * @return
	 */
	JobInfoBO getJobInfo(int id) throws JobCenterException;

	/**
	 * 获取指定页job
	 * 
	 * @param page
	 * @return
	 */
	List<JobInfoBO> getJobInfos(int page) throws JobCenterException;

	/**
	 * 新增一个job
	 * 
	 * @param job
	 * @return
	 */
	boolean addJob(JobInfoBO job);

	/**
	 * 更新一个job配置
	 * 
	 * @param job
	 * @return
	 */
	JobInfoBO updateJobInfo(JobInfoBO job) throws JobCenterException;

	/**
	 * 根据job Id删除一个job
	 * 
	 * @param id
	 * @return
	 */
	boolean deleteJob(int id) throws JobCenterException;
}
